#
#	This file is part of SRServerLibrary.
#	SRServelibrary is free software: you can redistribute it and/or modify
#	it under the terms of the GNU General Public License as published by
#	the Free Software Foundation, either version 3 of the License, or
#	(at your option) any later version.
#	
#	SRServerLibrary is distributed in the hope that it will be useful,
#	but WITHOUT ANY WARRANTY; without even the implied warranty of
#	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#	GNU General Public License for more details.
#	
#	You should have received a copy of the GNU General Public License
#	along with SRServerLibrary.  If not, see <http://www.gnu.org/licenses/>.
#

#!/bin/sh
echo "*** BUILDING TESTS ***"
echo "* Building SRPluginLoader test *"
g++ tests/source/SRPluginLoaderTest.cpp -lsrserverlibrary -lcunit -Isource -ldl -o tests/bin/srpluginloader

echo "* Building SRPlugin test *"
g++ tests/source/SRPluginTest.cpp -lsrserverlibrary -lcunit -Isource -ldl -o tests/bin/srplugin

echo "* Building SRMessenger test *"
g++ tests/source/SRMessengerTest.cpp -lsrserverlibrary -lcunit -Isource -ldl -o tests/bin/srmess

echo "* Building SRSettings test *"
g++ tests/source/SRSettingsTest.cpp -lsrserverlibrary -lcunit -Isource -ldl -o tests/bin/srsett



echo "*** RUNNING TESTS ***"

echo "* Running SRPluginLoader test *"
tests/bin/srpluginloader

echo "* Running SRPlugin test *"
tests/bin/srplugin

echo "* Running SRMessenger test *"
tests/bin/srmess

echo "* Running SRSettings test *"
tests/bin/srsett

echo "* Ruinning the testinstalled test *"
tests/testinstalled.sh